package com.dao;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.entity.FixVersionsEntity;
@Repository
public class FixVersionsDaoImpl extends GenericDaoImpl<FixVersionsEntity> implements FixVersionsDao{

	public FixVersionsEntity getFixVersionsById(Integer id) {
		return getById(FixVersionsEntity.class, id);
	}

	public List<FixVersionsEntity> getAllFixVersions() {
		return getAll(FixVersionsEntity.class);
	}

	public FixVersionsEntity getFixVersionsByUniqueId(String id) {
		String hql = "From FixVersionsEntity where id =:id";
		Query query = sessionFactory.getCurrentSession().createQuery(hql);
		query.setParameter("id",id);
		return (FixVersionsEntity) query.uniqueResult();
	}

}
